﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="PreContractWeb.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>预合同管理系统</title>
    <link href="css/default.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="Javascript/JScript.js"></script>
    <script language="javascript" type="text/javascript" src="Javascript/dataverify.js"></script>
    <script type="text/javascript">	
	function CheckBadWords() 
    {
	    var badwords = "'\"&()<>\\";
	  
	    var txtlogin = document.getElementById("txtname");
	    
	    var txtpwd   = document.getElementById("txtpwd");
	    
	    if(txtlogin != null & txtlogin.value == '')
	    {
	        alert("用户名不能为空！\nUser name is required!");
		    txtlogin.focus();
		    return false;
	    }
	      if(txtlogin != null & !check(txtlogin.value, badwords))
	    {
	        alert(" 用户名不能包含非法字符('\"&()<>\\).\nUser name can't include characters like '\"&()<>\\");
		    txtlogin.focus();
		    return false;
	    }
	    if(txtpwd != null & txtpwd.value == '')
	    {
	        alert("密码不能为空！\nPassword is required!");
		    txtpwd.focus();
		    return false;
	    }
	  
	  //if(txtpwd != null & !txtpwd(txtlogin.value, badwords))
	    //{
	   //     alert(" 密码不能包含非法字符('\"&()<>\\).");
		//    txtpwd.focus();
		//    return false;
	  //  }
	    	  
	     return true;    
    }
    </script>

</head>
<body style="margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;">
    <form id="form1" runat="server">
     <table border="0" width="1006" height="642"  align="center" valign="middle" style="background-image:url(images/login_back.gif);background-repeat: no-repeat; background-position:center center;" >
        <tr>
            <td colspan="2">&nbsp;<br />&nbsp;</td>
        </tr>

         <tr>
            <td align="center" valign="Top">
                <table width="250" border="0" cellspacing="0" cellpadding="0" align="right">
                    <tr>
                        <td class="subhead" align="right" width="40%"  height="12">
                            用 户 名：                             
                        </td>
                        <td align="right" rowspan="2">
                            <asp:TextBox ID="txtname" runat="server" CssClass="textfield" Text="Zhiqun XU"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="subhead" width="40%" height="12">
                              User Name：
                        </td>                       
                    </tr>
                    <tr>
                        <td class="subhead" align="right"  height="12">
                            密   码：
                        </td>
                        <td align="right"  rowspan="2">
                            <asp:TextBox ID="txtpwd" runat="server" TextMode="Password" CssClass="textfield2"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="subhead" width="40%"  height="12">
                              Password：
                        </td>                       
                    </tr>

                    <tr align="right">
                        <td colspan="2">
                            <asp:ImageButton ID="btnlogin" runat="server" CausesValidation="true" OnClick="btnlogin_Click"
                                CssClass="button" ImageUrl="images/Btn_login.gif" ToolTip="Login" />&nbsp;
                         </td>
                    </tr>
                </table>

            </td>
            <td width="70">&nbsp;</td>
        </tr>
     </table>

        <script type="text/javascript">
          var obj = document.getElementById('txtname');
          if(obj !=null)
          {
             obj.focus();
          }
        </script>

        
    </form>
</body>
</html>
